package com.xuetang9.demo.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.xuetang9.demo.ssm.dao.ResourceMapper;
import com.xuetang9.demo.ssm.domain.Resource;
import com.xuetang9.demo.ssm.service.ResourceService;

@Service
public class ResourceServiceImpl implements ResourceService{

	@Autowired
	private ResourceMapper resourceMapper;
	
	@Override
	public List<Resource> listAll() {
		return resourceMapper.listAll();
	}

	
	@Override
	public Page<Resource> listByPage(int pageNum, int pageSize) {
		Page<Resource> page = PageHelper.startPage(pageNum, pageSize);
		resourceMapper.listAll();
		return page;
		
	}

}
